# -*- coding:utf-8 -*-
import pdfkit

'''
获取PDF
'''


def getPDF(url, pdfName):
    options = {
        'page-size': 'A4',
        'margin-top': '0mm',
        'margin-right': '0mm',
        'margin-bottom': '0mm',
        'margin-left': '0mm',
        'encoding': "UTF-8",
        'no-outline': None,
    }
    return pdfkit.from_url(url, pdfName, options=options)
